<?php $this->nav = "圈子管理 > 圈子活动管理"?>
<div id="aannouncement_index_title">
</div>
<?php $url = new Zend_Controller_Action_Helper_Url();;?>
<div id="a_content_border">
<form id="form1" name="form1" method="post" action="<?= $url->simple('top', 'aannouncement', null);?>">
	<div class="w-listp">
	    <?php $url = new Zend_Controller_Action_Helper_Url();?>
	    <? foreach($this->announcements as $announcement):  ?>
        <div class="announcementitem clearfix">
        	<table width="100%">
        		<tr>
        			<td width="20">
        				<input type="checkbox" name="select[]" id="select" value="<?= $announcement->id?>" />
        			</td>
        			<td width="400">
        			    <?php if ($announcement->top):?>
        			    <a href="<?=$url->simple('top','aannouncement','',array('id'=>$announcement->id)); ?>">
            	        <font color="#FF0000">[取消置顶]</font><?php endif;?>
            	        </a>
            			<a href="<?=$this->url(array('announcementId' => $announcement->id),
            	        'announcement_content'); ?>"><?=$this->Escape($announcement->title); ?></a>
        			</td>
        			<td width="65">
        			    <? $date = new Zend_Date($this->Escape($announcement->publishdate), Zend_Date::TIMESTAMP); ?>
                        <?= $date->toString("Y-M-d");?>
        			<td width="70">
						<a href="<?= $url->simple('edit', 'aannouncement', null,array('announcementId'=>$announcement->id)); ?>">编辑 </a>
	                    <?= '  ' ?>
                	    <a href="javascript:if(confirm('确实要删除吗?'))location='
                		<?= $url->simple('delete', 'aannouncement', null,array('announcementId'=>$announcement->id));  ?>
                		'">删除</a>
        			</td>
        		</tr>
        	</table>
        </div>
        <? endforeach; ?>
        
        <div style="width:624px; padding-left:220px; margin-top:20px; margin-bottom: 30px;">
        	<input type="submit" name="top" id="top" value="推荐置顶" />
        </div>
        
        <div style="width:624px; margin-left:80px;">
        <?if ($this->announcements instanceof Zend_Paginator): ?>
        	<?= $this->paginationControl($this->announcements, 'sliding', 'aannouncement/_paginator.phtml')?>
        <?endif?>
        </div>
    </div></form>
</div>
